export default {
    after(data) {
        // if (data.packageName === 'android.graphics' && data.className === 'RectF') {
        //     data.methods.forEach(it => {
        //         console.log(it);
        //         if (it.method == 'contains(float, float)') {
        //             data.riskLevel = 1
        //             data.desc = '使用ohos.agp.utils.RectFloat中isInclude(float,float)替换'
        //         }

        //         if (it.method == 'height()') {
        //             data.riskLevel = 1
        //             data.desc = '使用ohos.agp.utils.RectFloat中getHeight()替换'
        //         }

        //         if (it.method == 'width()') {
        //             data.riskLevel = 1
        //             data.desc = '使用ohos.agp.utils.RectFloat中getWidth()替换'
        //         }
        //     })
        // }
        if (data.packageName === 'android.graphics.drawable.Animatable2' && data.className === 'AnimationCallback') {
            if (data.method == 'onAnimationEnd') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.animation.Animator.StateChangedListener中onStop替换'
            }

            if (data.method == 'onAnimationStart') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.animation.Animator.StateChangedListener中onStart替换'
            }

        }

        if (data.packageName === 'androidx.appcompat.widget' && data.className === 'AppCompatButton') {
            if (data.method == 'setBackgroundResource') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.Button中setBackground替代'
            }

            if (data.method == 'setTextSize') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.Button中setTextSize替代'
            }
        }

        if (data.packageName === 'android.widget') {

            if (data.className === 'AdapterView') {
                if (data.method == 'OnItemClickListener') {
                    data.riskLevel = 1
                    data.desc = '使用ListContainer.ItemClickedListener中onItemClicked替代'
                }
                if (data.method == 'OnItemLongClickListener') {
                    data.riskLevel = 1
                    data.desc = '使用ListContainer.ItemLongClickedListener中onItemLongClicked替代'
                }
            }

            if (data.className === 'Toast') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.window.dialog中ToastDialog替代'
            }

            if (data.className === 'EditText') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.TextField替代'
            }

            if (data.className === 'FrameLayout') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.StackLayout替代'
            }

            if (data.className === 'ImageView' && data.method == 'setVisibility') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.Image中setVisibility替代'
            }
            if (data.className === 'LinearLayout') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.DirectionalLayout替代'
            }

            if (data.className === 'LinearLayout' && data.method == 'LayoutParams') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.DirectionalLayout.LayoutConfig替代'
            }
            if (data.className === 'ListView' && data.method == 'getAdapter') {
                data.riskLevel = 1
                data.desc = '使用ohos.agp.components.ListContainer中getItemProvider​替代'
            }
            if (data.className === 'TextView') {
                if (data.method == 'setPadding') {
                    data.riskLevel = 1
                    data.desc = '使用ohos.agp.components.Text中setPadding​替代'
                }
                if (data.method == 'setTextSize') {
                    data.riskLevel = 1
                    data.desc = '使用ohos.agp.components.Text中setTextSize替代'
                }
            }
        }
        if (data.packageName === 'android.text' && data.className == 'TextWatcher') {
            data.riskLevel = 1
            data.desc = '使用ohos.agp.components.Text.TextObserver替代'
        }
        if (data.packageName === 'android.view' && data.className == 'Gravity') {
            data.riskLevel = 1
            data.desc = '使用ohos.agp.utils.LayoutAlignment替代'
        }
        if (data.packageName === 'androidx.core.content' && data.className == 'ContextCompat' && data.method == 'getColor') {
            data.riskLevel = 1
            data.desc = '使用ohos.app.Context中getContext().getResourceManager().getElement(int).getColor()替代'
        }
        if (data.packageName === 'androidx.util' && data.className == 'TypedValue') {
            data.riskLevel = 1
            data.desc = '使用ohos.agp.components.Text中TextSizeType替代'
        }
    }

}